home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / smaltalk / stv.lha / STV / st_v / util / STVUTIL7.ZIP / WINRUN.TXT < prev    next >
Text File  |  1993-02-07  |  1KB  |  28 lines

  1. Trying to run a Smalltalk/V for Windows 2.0 (or earlier) runtime under
  2. WIN/OS of OS/2 2.0 returns system error about sharing violation on
  3. VWSIGNON.DLL.  Sign on windows comes up, then loading aborts.   Filein the
  4. following method to resolve:
  5.  
  6. !SystemDictionary methods !
  7.    
  8. signonDLL
  9.         "Answers the signon DLL's file name embedded in the
  10.          image.  When the Smalltalk runtime application
  11.          ( the image) is executed, the signon DLL specified in
  12.          aString will first be loaded before the application is started
  13.          up."
  14.     | aFile answer string |
  15.     aFile := File pathNameReadOnly: self imageName.
  16.     aFile atEnd
  17.         ifTrue:[ aFile close ]
  18.         ifFalse:[
  19.             aFile position: 16r1212.
  20.             ( aFile next = $S and: [ aFile next = $F ] )
  21.                 ifTrue: [
  22.                     answer := aFile upTo: ( Character value:0 ).
  23.                     aFile close.
  24.                     ^answer ]
  25.                 ifFalse: [
  26.                     aFile close.
  27.    ^self error: 'Could not find signon file name signature characters' ] ]! !
  28.